package com.job.Gai_Yian.Homework0711;

/**
 * @author Gai_Yian
 * @version 1.0
 * @since 2022-07-12 11:57:13
 */
public class ShowPacking {
    public static void main(String[] args) {
        //创建基本类型的包装对象   整数为例
        Integer i=new Integer(100); //获取字符串
        String s=i.toString();
        System.out.println(s);

        Integer si=new Integer("40624869");//获取整数
        int num=si.intValue();
        System.out.println(num+100);

        Integer ii=200;
        int inum=ii;

        int anInt=Integer.parseInt("9087");//字符串转基本类型
        System.out.println(anInt+1);

        boolean b=Boolean.parseBoolean("true");
        System.out.println(!b);
                                             //基本类型转字符串
        double pai=3.14;
        String s_pai=pai+"";                 //1. +""
        String s_pai2=String.valueOf(pai);   //2.工具方法valueOf
        String s_pai3=Double.toString(pai);
    }
}
